Output filter
Concept
When dealing with binary data, Orchestra must transfer the binary content (e.g., a file) to its internal format. In this context, two concepts are important: serializers and filters. A serializer is responsible for converting an Orchestra message into an external byte representation. After this transformation, it may be necessary to further process the generated byte data. This post-processing, which occurs after the serializer, is handled by output filters and is organized as a sequence of filters that can be applied following the serializer. In this chapter, we describe the creation of such a user-defined filter.
Creation
Step 1 : Create a new Java Source.
Step 2 : Select "Output Filter" as Class template.

After the creation of the java source the following screen appears:

The generated template is based on the concept of a filter stream. The serializer writes its data to an output stream. Depending on the configuration, a user-defined filter may also be invoked within the filter chain. Whenever the user-defined filter is called by the write method, it is allowed to modify the written bytes, and new bytes can also be added. In the example above, when the write method is invoked, the original value is typically passed to the next underlying output stream. However, if a semicolon is written, it is replaced with a '/' sign.